package com.karrim.server.abstr;

import com.karrim.server.util.array.DynamicList;
import com.karrim.server.util.array.def.Array;
import com.karrim.server.util.def.Dispatcher;
import com.karrim.server.util.def.Event;
import com.karrim.server.util.def.Listener;

/**
 *
 * @author andrea.cantafio
 */
public abstract class AbstractDispatcher<EventType extends Event, ListenerType extends Listener> extends Thread implements Dispatcher<EventType, ListenerType> {

    public AbstractDispatcher(String threadName, int maxListeners) {
        super(threadName);
        MAX_LISTENERS = maxListeners;
        listeners = new DynamicList<>();
    }
    public final int MAX_LISTENERS;
    protected Array<Listener> listeners;
}
